<?php

namespace App\Http\Controllers\Api;

use App\Api\Helpers\ApiResponse;
use App\Http\Controllers\Controller;
use App\Api\Helpers\MoveNumber;

class ApiController extends Controller
{

    use ApiResponse;
    use MoveNumber;

    protected $data =[];

    //=========返回信息===================

    /**
     * @param string $msg  返回信息
     * @param array $list
     * @param int $status -1为数据异常,获取失败等 -eg:参数错误等 status=201为重新登录,成功 200
     * @return array
     */
    protected function ReturnMessage($status=-1,$msg='',$list=[]){
        $data = [];
        $data['status'] = $status;
        $data['msg'] = $msg;
        $data['list'] =$list;
        return $data;
    }
}